/*菜单*/
export class Menu {

    //region # 字段及构造器

    /**
     * 菜单 有参构造器
     * @param index - 主键
     * @param title - 标题
     * @param routerPath - 路由路径
     * @param isLeaf - 是否子菜单
     * @param icon - 图标
     * @param sort - 排序
     * @param componentName - 组件名称
     * */
    constructor(index:string, title:string, isLeaf:boolean, sort:number, icon:string, componentName:string, routerPath:string,);
    /**
     * 菜单 有参构造器
     * @param index - 主键
     * @param title - 标题
     * @param routerPath - 路由路径
     * @param isLeaf - 是否子菜单
     * @param icon - 图标
     * @param sort - 排序
     * @param children - 子菜单
     * @param componentName - 组件名称
     * */
    constructor(index:string, title:string, isLeaf:boolean, sort:number, icon:string, componentName:string, routerPath:string, children:Array<Menu>);

    /**
     * 菜单 有参构造器
     * @param index - 主键
     * @param title - 标题
     * @param routerPath - 路由路径
     * @param componentName - 组件名称
     * @param isLeaf - 是否子菜单
     * @param icon - 图标
     * @param sort - 排序
     * @param children - 子菜单
     * */
    constructor(index:string, title:string, isLeaf:boolean, sort:number, icon?:string, componentName?:string, routerPath?:string, children?:Array<Menu>) {
        this.index = index;
        this.title = title;
        this.componentName = componentName;
        this.routerPath = routerPath;
        this.icon = icon;
        this.isLeaf = isLeaf;
        this.sort = sort;
        this.children = children;
    }

    //endregion

    //region # 属性

    //region 主键 —— index:string
    /*主键*/
    public index:string;
    //endregion

    //region 标题 —— title:string
    /*标题*/
    public title:string;
    //endregion

    //region 组件名称 —— componentName:string | undefined
    /*组件名称*/
    public componentName:string | undefined;
    //endregion

    //region 路由路径 —— routerPath:string | undefined
    /*路由路径*/
    public routerPath:string | undefined;
    //endregion

    //region 图标 —— icon:string | undefined
    /*图标*/
    public icon:string | undefined;
    //endregion

    //region 是否叶子节点 —— isLeaf:boolean
    /*是否叶子节点*/
    public isLeaf:boolean;
    //endregion

    //region 子菜单 —— children:Array<Menu> | undefined
    /*子菜单*/
    public children:Array<Menu> | undefined;
    //endregion

    //region 排序 —— sort:number
    /*排序*/
    public sort:number;
    //endregion

    //endregion

}